export default {
	chunk(arr,size ) {
	    var num = [];
	    for(var i=0;i<Math.ceil(arr.length/size);i++){
	      var start = i*size;
	      var end = start+size;
	      num.push(arr.slice(start,end));
	      
	    }
	   return num;
	 },
	 //数字周转中文
	 resetWeek(day){
	 	let weeks = {
	 		1:"周一",
	 		2:"周二",
	 		3:"周三",
	 		4:"周四",
	 		5:"周五",
	 		6:"周六",
	 		0:"周日"
	 	}
	 	return weeks[day]
	 },
	 getTime(date) {
		let y = date.getFullYear() //年
		let m = date.getMonth() + 1  //月，月是从0开始的所以+1
		let d = date.getDate() //日
		m = m < 10 ? "0" + m : m //小于10补0
		d = d < 10 ? "0" + d : d //小于10补0
		return y + "-" + m + "-" + d; //返回时间形式yyyy-mm-dd
	}
}